#include "send.h"

Send::Send():Process()
{
    name = "Send";
}

Send::~Send()
{
}

void Send::Run(){
    LogManager::getSingleton().Message("Send", "step "+LogManager::getSingleton().toStr(currentStep));
    switch(currentStep){
    case 0:{
        ResourceAllocator::getSingleton().askForResource("LineForOutput",id);
    }
    break;
    case 1:{
        ResourceAllocator::getSingleton().askForResource("OutputDevice",id);
    }
    break;
    case 2:{
    //cia turi gaut stiringa kazkoki ir ji nukopint i 4 zingsni
    }
    break;
    case 3:{
         ResourceAllocator::getSingleton().freeResource(*usingResourceList.begin());
    }
    break;
    case 4:{
         //lineOfInput = reinterpret_cast<UserInput*>(ResourceAllocator::getSingleton().getResource("UserInput"));
         //lineOfInput->input="ka as gui gavo";
         //ResourceAllocator::getSingleton().addResource(new UserInput);
         currentStep=-1;
    }
    break;
    default:
      qDebug() << "gg Send";
    }
    currentStep++;
}
